package com.mysteel.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.mysteel.common.utils.PageUtils;
import com.mysteel.member.entity.MemberEntity;
import com.mysteel.member.exception.CommonException;
import com.mysteel.member.vo.MemberLoginVo;
import com.mysteel.member.vo.SocialUserLoginVo;
import com.mysteel.member.vo.UserRegisterVo;

import java.util.Map;

/**
 * 会员
 *
 * @author xc
 * @email xcremote@163.com
 * @date 2020-12-11 09:06:56
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 用户注册
     * @param registerVo
     */
    void registerUser(UserRegisterVo registerVo) throws CommonException;

    MemberEntity login(MemberLoginVo loginVo) throws CommonException;

    /**
     * 社交登录实现（已有账号则登录，没有就注册）
     * @param loginVo
     * @return
     * @throws CommonException
     */
    MemberEntity socialUserLogin(SocialUserLoginVo loginVo) throws CommonException;
}

